package com.guoqi.service.impl;

import com.guoqi.domain.UserInfo;
import com.guoqi.repository.UserRepository;
import com.guoqi.service.IUserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserInfoServiceImpl implements IUserInfoService {
    @Autowired
    private UserRepository repository;
    @Override
    public UserInfo findByName(String name) {
        System.out.println(repository.findByNickname("dafei"));
        return repository.findByNickname("dafei");
    }

    @Override
    public List<UserInfo> findByPasswd(String passwd) {
        return repository.findByPassword(passwd);
    }
}
